package vista;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.KeyAdapter;
import javax.swing.JButton;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import javax.swing.WindowConstants;
import javax.swing.event.MenuKeyEvent;
import javax.swing.event.MenuKeyListener;
import javax.swing.SwingUtilities;

import controlador.CtrPrincipalJuego;
import java.awt.BorderLayout;
import java.awt.GridLayout;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VistaOpciones extends javax.swing.JFrame {
	public JButton getjButton1() {
		return jButton1;
	}

	public JButton getjButton5() {
		return jButton5;
	}

	public JButton getjButton4() {
		return jButton4;
	}

	public JButton getjButton3() {
		return jButton3;
	}

	public JButton getjButton2() {
		return jButton2;
	}
	private JButton jButton1;
	private JButton jButton5;
	private JButton jButton4;
	private JButton jButton3;
	private JButton jButton2;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VistaOpciones inst = new VistaOpciones();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VistaOpciones() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Buscaminas AJI");
			GridLayout thisLayout = new GridLayout(1, 3);
			thisLayout.setColumns(1);
			thisLayout.setHgap(5);
			thisLayout.setVgap(5);
			getContentPane().setLayout(thisLayout);
			getContentPane().setBackground(new java.awt.Color(255,255,255));
			{
				jButton1 = new JButton();
				getContentPane().add(jButton1);
				jButton1.setText("Basico");
			}
			{
				jButton2 = new JButton();
				getContentPane().add(jButton2);
				jButton2.setText("Intermedio");
			}
			{
				jButton3 = new JButton();
				GridLayout jButton3Layout = new GridLayout(1, 1);
				jButton3Layout.setColumns(1);
				jButton3Layout.setHgap(5);
				jButton3Layout.setVgap(5);
				jButton3.setLayout(jButton3Layout);
				getContentPane().add(jButton3);
				jButton3.setText("Avanzado");
			}
			{
				jButton4 = new JButton();
				getContentPane().add(jButton4);
				jButton4.setText("Personalizado");
			}
			{
				jButton5 = new JButton();
				getContentPane().add(jButton5);
				jButton5.setText("Mejores Tiempos");
			}
			pack();
			this.setSize(646, 256);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	private void jMenuItem1ActionPerformed(ActionEvent evt) {
//		VentanaJuego vent = new VentanaJuego();
	//	vent.show();
		//new ControladorPrincipalJuego(10,10,10).getVentanaJuego().setVisible(true);

		
		//TODO add your code for jMenuItem1.actionPerformed
	}	public void escuchar(ActionListener interfa)
	{
		jButton1.addActionListener(interfa);
		jButton2.addActionListener(interfa);
		jButton3.addActionListener(interfa);
		jButton4.addActionListener(interfa);
		jButton5.addActionListener(interfa);
	}

}
